package com.practice.httputils.httpClient;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

/**
 * @Description : apache httpclient工具
 * @Author : guxuemin
 * @Version : V1.0.0
 * @Date : 2021/9/12 17:11
 */
public class httpUtil {
    public static void main(String[] args) {
        List<String> s1 = Arrays.asList(args);
        s1.stream().filter(s -> s.length() > 5).collect(Collectors.toList());

        List<String> words = Arrays.asList("Hello", "World");
        words.stream()
                .map(word -> word.split(""))
                .flatMap(Arrays::stream)
                .distinct()
                .collect(Collectors.toList());

        String abc = "abc1233";
        // match都是完全匹配，从头到尾都满足，而不是局部满足
        System.out.println(abc.matches("^[a-z]+[1-9]+$"));
        List<Integer> aa = Arrays.asList(1, 2, 3);
        Integer sum = aa.stream().reduce(0, Integer::sum);
    }
}
